﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Spotless.Data.DataAccess.Interfaces;

namespace Spotless.Data.DataAccess.Sql
{
    public abstract class BaseRepository : IBaseRepository
    {
        protected BaseRepository(SpotlessDataContext dataContext)
        {
            this.DataContext = dataContext ?? new SpotlessDataContext();
        }

        protected SpotlessDataContext DataContext { get; private set; }
        
        public void SaveChanges()
        {
            DataContext.SubmitChanges();
        }
    }
}
